// const NowReg = require('../dao/shouyeDao')
const db = require('../DBcofig/DBConnection')
module.exports = {
    setHotKe(req, res) {
        let sql = 'select * from hotke order by Gua desc limit 0,5'
        let arr = []
        db.dbconfig(res, sql, arr, function (data) {
            if (data !== null) {
                res.send({
                    code: 200,
                    msg: '查询成功',
                    data: data
                })
            }
        })

    },
    setHotDoc(req, res) {
        let sql = 'select * from hotdoctor order by Doc_num desc limit 0,5'
        let arr = []
        db.dbconfig(res, sql, arr, function (data) {
            if (data !== null) {
                res.send({
                    code: 200,
                    msg: '查询成功',
                    data: data
                })
            }
        })
    },
    setHotGua(req, res) {
        let sql = "select * from guahao,imgs where gua_id = img_id  "
        let arr = []
        db.dbconfig(res, sql, arr, function (data) {
            if (data !== null) {
                res.send({
                    code: 200,
                    msg: '查询成功',
                    data: data
                })
            }
        })
    }
}